package com.ding.questionnaire;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class Login extends Activity {
	Button login;
	EditText usernameET, passwordET;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_login);

		login = (Button) findViewById(R.id.button1);
		usernameET = (EditText) findViewById(R.id.username);
		passwordET = (EditText) findViewById(R.id.password);
		login.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				loginTask loginTask = new loginTask(Login.this);
				String[] s = { usernameET.getText().toString(),
						passwordET.getText().toString() };
				loginTask.execute(s);
				
			}
		});
	}
}
